# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(ohtest)

FILE(GLOB bxSource
        bx/src/*
        )
list(FILTER bxSource EXCLUDE REGEX amalgamated)
add_library(bx STATIC ${bxSource})
target_compile_definitions(bx PUBLIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DWITH_PIX -DBUILDING_BXCORE)
target_include_directories(bx PUBLIC
            bx/include
            bx/3rdparty
            )

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)


add_library(entry SHARED napi_init.cpp)
target_link_libraries(entry PUBLIC bx libace_napi.z.so hilog_ndk.z.so)